package com.czmh.etc.interpreter.entity.base;

/**
 * Created by Huangyk on 2019/6/5.
 */
public class ResponseBodyBase extends Header {
    public static int BOSY_BASE_LEN = Header.HEADER_LEN + 21;

    private String WasteSn;
    private byte Flag;

    public ResponseBodyBase(EnMessagetype msgType) {
        super(msgType);
    }

    public ResponseBodyBase(String bodyBase) {
        super(bodyBase.substring(0, Header.HEADER_LEN));

        int currPos = Header.HEADER_LEN;

        this.WasteSn = bodyBase.substring(currPos, 20);
        currPos += 20;

        this.Flag = Byte.parseByte(bodyBase.substring(currPos, 1));
    }

    //region getter && setter
    public String getWasteSn() {
        return WasteSn;
    }

    public void setWasteSn(String wasteSn) {
        WasteSn = wasteSn;
    }

    public byte getFlag() {
        return Flag;
    }

    public void setFlag(byte flag) {
        Flag = flag;
    }
    //endregion
}
